package shimizu.event;

import java.util.EventObject;
import java.util.LinkedList;


public class Event<A extends EventObject> {

	private LinkedList<IEventHandle<A>> handles;
	
	public Event(){
		handles=new LinkedList<IEventHandle<A>>();
	}
	
	public void addHandle(IEventHandle<A> handle){
		handles.add(handle);
	}
	
	public void removeHandle(IEventHandle<A> handle){
		handles.remove(handle);
	}
	
	public void raise(A arg){
		for(IEventHandle<A> h : handles){
			h.raise(arg);
		}
	}
}
